package exercise1;
import java.util.Scanner;
public class No5_17 {
    public static void main(String []args)
    {
        Scanner input=new Scanner(System.in);
        System.out.println("Enter the number of lines: ");
        int a=input.nextInt();
        for(int i=1;i<=a;i++)//行
        {
            for(int j=0;j<a-i;j++)//空格
            {
                System.out.print("  ");
            }
            int print_num=i;
            if (print_num==1)
            {
                System.out.println(1);
                continue;
            }
            while (print_num>1)
            {
                System.out.print(print_num--);
                System.out.print(" ");
            }
            while (print_num<=i)
            {
                System.out.print(print_num++);
                System.out.print(" ");
            }
            System.out.print("\n");
        }
    }
}
